class_name StateComponent
extends RefCounted

##
var parent: State

##
var active: bool

##
var name: String


func _init(init_name: String) -> void:
	parent = null
	active = true
	name = init_name


func on_setup() -> void:
	_on_setup()


func on_enter() -> void:
	_on_enter()


func on_update(delta: float) -> void:
	if active:
		_on_update(delta)


func on_exit() -> void:
	_on_exit()


#region Need to override
func _on_setup() -> void:
	pass


func _on_enter() -> void:
	pass


func _on_update(_delta: float) -> void:
	pass


func _on_exit() -> void:
	pass
#endregion
